<template>
  <div>
    <div class="user">
      <div class="top">
        <div class="imgs">
          <img src="../assets/images/my.jpg" alt="" />
        </div>
        <router-link class="text" to="/userdetails" tag="div">
          狄仁杰<span class="iconfont icon-icon-12"></span>
        </router-link>
        <span class="scan iconfont icon-saoyisao" @click="sao"></span>
      </div>
      <div class="term">
        <router-link class="collect" to="/collect" tag="div">
          <span class="iconfont icon-icon-10"></span>
          <div>收藏的歌单</div>
          <span class="iconfont icon-arrow-right-"></span>
        </router-link>
        <router-link class="collect" tag="div" to="/lovemusic">
          <span class="iconfont icon-xin"></span>
          <div>我喜欢的音乐</div>
          <span class="iconfont icon-arrow-right-"></span>
        </router-link>
      </div>
      <div class="term">
        <router-link class="collect" tag="div" to="/about">
          <span class="iconfont icon-i-help"></span>
          <div>关于</div>
          <span class="iconfont icon-arrow-right-"></span>
        </router-link>
        <div class="collect" @click="logout">
          <span class="iconfont icon-tuichu"></span>
          <div>退出登录</div>
          <span class="iconfont icon-arrow-right-"></span>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { Notify } from "vant";
export default {
  data() {
    return {};
  },
  methods: {
    logout() {
      this.$store.commit("setLogin", false);
      this.$router.push({
        path: "/login",
      });
    },
    sao() {
      Notify({ type: "primary", message: "你没摄像头" });
    },
  },
};
</script>

<style lang="less">
.user {
  width: 100%;
  height: 100vh;
  padding: 10px;
  box-sizing: border-box;
  background-color: rgba(42, 166, 248, 0.5);
  color: white;
  .top {
    display: flex;
    height: 46px;
    line-height: 46px;
    .imgs {
      height: 46px;
      img {
        height: 26px;
        width: 26px;
        border-radius: 50%;
      }
    }
    .text {
      flex: 1;
      font-size: 5vw;
      margin-left: 8px;
      letter-spacing: 0.1em;
      span {
        font-size: 5vw;
      }
    }
    .scan {
      width: 36px;
      text-align: center;
      font-size: 6vw;
    }
  }
  .term {
    margin-top: 15px;
    background: linear-gradient(45deg, rgb(80, 187, 230), skyblue);
    border-radius: 2vw;
    & > div {
      display: flex;
      padding: 0 10px;
      box-sizing: border-box;
      height: 46px;
      line-height: 46px;
      border-bottom: 1px solid skyblue;
      &:last-child {
        border: none;
      }
      div {
        flex: 1;
        font-size: 4vw;
      }
      span {
        width: 10%;
        font-size: 4vw;
      }
    }
  }
}
</style>